import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

export type DetailResult = {
  code: number;
  data: any;
  msg: string;
};

/** 获取物料树 */
export const getMaterialTreeQueryTree = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/materialTree/queryTree"),
    data
  });
};

/** 获取物料树列表带分页 */
export const getMaterialTreeList = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/materialTree/pageTreeList"),
    data
  });
};
